<%@ page contentType="text/html;charset=GBK" %>
<%@ page import="java.util.*" %>
<%@ page import="com.ionglobal.db.*" %>
<%@ page import="com.ionglobal.lib.*" %>
<%@ page import="com.ionglobal.misc.*" %>

<%@ include file="../init_include.jsp" %>
<%
out.print("<!--"+request.getHeader("Referer")+"-->");
%>
<html>
<head>
<title><%=Language.getNameByCode("sys.sysop.password.title","Change Password")%></title>
<meta http-equiv="Content-Type" content="text/html; charset=<%=Language.getHTMLLanguageStr()%>">
<link rel="stylesheet" href="../css.css" type="text/css">
</head>
<body class="bgcolor_title_tr">
<table width="100%" border="0" cellspacing="1" cellpadding="2" class="input_title">
  <tr>
    <td><%=Language.getNameByCode("sys.sysop.password.title","Change Password")%></td>
  </tr>
</table>
<hr>
<%
	Sysop sysop=(Sysop)session.getAttribute("sysop");
	if ( sysop==null)
	{
		dbi.closeAll();
		return;
	}
	
	
		String oldpassword="",password="";
		if(request.getParameter("oldpassword")!=null)
			oldpassword=request.getParameter("oldpassword");
		if(request.getParameter("password")!=null)
			password=request.getParameter("password");
			out.println("password:" + password);
		Sysop sysop1=Sysop.getSysop(dbi,sysop.getName(),oldpassword);
		if(sysop1==null) {					
%>
<table  border="0" cellspacing="1" cellpadding="2" bgcolor="#666666" width="80%">
  <tr class="bgcolor_title_tr"> 
    <td class="input_title">&nbsp;<%=Language.getNameByCode("sys.error.info","Error Info")%></td>
  </tr>
  <tr> 
    <td class="bgcolor_title_tr">&nbsp;<%=Language.getNameByCode("sys.sysop.password.error","Old password is error! Click <a href=\"javascript:history.go(-1);\">here</a> to back!")%></td>
  </tr>
</table>
	<%	} else {
		Sysop.changePassord(dbi,sysop.getName(),password);
	%>
<table  border="0" cellspacing="1" cellpadding="2" bgcolor="#666666" width="80%">
  <tr class="bgcolor_title_tr"> 
    <td class="input_title">&nbsp;<%=Language.getNameByCode("sys.sysop.cp","Change Password")%></td>
  </tr>
  <tr> 
    <td class="bgcolor_title_tr">&nbsp;<%=Language.getNameByCode("sys.sysop.password.successful","Change password successfully!")%></td>
  </tr>
</table>
<%}%>
</body>
</html>

<%@ include file="../init_free.jsp" %>
